import React from "react";
import { Map, View } from "@tarojs/components";
import {
  navigateBack,
  navigateTo,
  useRouter,
  getSystemInfo,
} from "@tarojs/taro";
import location from '@/assets/location.png'

const Users = () => {
  const router = useRouter();
  const location = router.params.location;

  const [longitude, latitude] = location.split(",");

  return (
    <View style={{ width: "100%", height: "100vh" }}>
      <Map
        style={{ width: "100%", height: "100%" }}
        longitude={longitude}
        latitude={latitude}
        markers={[
          {
            id: "1",
            latitude,
            longitude,
            title: "我的位置",
            iconPath: "../../assets/location.png",
            width: 38,
            height: 38,
          },
        ]}
      ></Map>
    </View>
  );
};

export default Users;
